package com.itany.corejava.day03;

import java.util.Scanner;

public class Test3 {

    public static void main(String[] args) {

        System.out.println("输入成绩[0-100]:");
        Scanner sc=new Scanner(System.in);

        int score=sc.nextInt();

        if(score<0||score>100){
            System.out.println("分数无效");
            //结束当前方法
            // return;
            //停止虚拟机
            System.exit(0);
        }

        String level;
        if(score>=90){
            level="A";
        }else if(score>=80){
            level="B";
        }else if(score>=70){
            level="C";
        }else if(score>=60){
            level="D";
        }else{
            level="E";
        }

        System.out.println("等级为："+level);


        switch (score/10){
            case 10:
                System.out.println(10);
                level="A";
                break;
            case 9:
                System.out.println(9);
                level="A";
                break;
            case 8:
                System.out.println(8);
                level="B";
                break;
            case 7:
                System.out.println(7);
                level="C";
                break;
            case 6:
                System.out.println(6);
                level="D";
                break;
            default:
                System.out.println("default");
                level="E";
                break;
        }
        System.out.println("等级为："+level);

    }
}
